<template>
  <el-card style="width:700px;height:500px;background-color:powderblue;margin-top:40px;margin-left:200px;">
    <div class="div">
      <el-row>
        <span style="margin-left:200px;font-size: 25px;">请在此输入病情</span>
      </el-row>
      <el-row style="margin-top:100px;">
          <el-input type="textarea" size:medium v-model="text" :rows="4"  style="width:400px;height:200px;margin-left:120px" size=""></el-input>
          <el-button @click="tijiao">提交</el-button>
      </el-row>
    </div>
  </el-card>
</template>

<script>
import axios from "axios"
export default {
  data(){
    return{
      text:''
    }
  },
  methods:{
    async tijiao(){
      await axios.post("/api/ill_yvce_receve",JSON.stringify(this.text))
      .then(() => {
        console.log("发送成功")
        axios.get("/api/ill_yvce_post").then((Response) =>{
          console.log("获取成功")
          console.log(Response)
          console.log(Response.data)
          if(Response.data == 'wy'){
            this.$router.push("/ill_yvce_wy")
          }
          if(Response.data == 'gm'){
            this.$router.push("/ill_yvce_gm")
          }
          if(Response.data == 'gxy'){
            this.$router.push("/ill_yvce_gxy")
          }
          if(Response.data == 'nlgr'){
            this.$router.push("/ill_yvce_nlgr")
          }
          if(Response.data == 'sy'){
            this.$router.push("/ill_yvce_sy")
          }
          if(Response.data == 'tnb'){
            this.$router.push("/ill_yvce_tnb")
          }
          if(Response.data == 'xzb'){
            this.$router.push("/ill_yvce_xzb")
          }
          if(Response.data == 'fy'){
            this.$router.push("/ill_yvce_fy")
          }
        })
      })
    }
  }

}
</script>

<style scoped lang='less'>
.s{
  font-size: 20px;
}

</style>